package com.samsung.service.vote;

import java.util.List;
import java.util.Map;

import com.samsung.dto.vote.VoteHistoryDto;
import com.samsung.model.vote.VoteOption;
import com.samsung.model.vote.VoteTopic;

public interface  TopicService {
	int deleteByPrimaryKey(String oid);

    int insert(VoteOption record);

    int insertSelective(VoteOption record);

    VoteOption selectByPrimaryKey(String oid);

    int updateByPrimaryKeySelective(VoteOption record);
    /**
     * 
     * @Title: getTopic 
     * @Description: TODO(查询Topic对象) 
     * @param @param tid
     * @param @return    设定文件 
     * @return Topic    返回类型 
     * @throws
     */
    public VoteTopic getTopic(String tid);

    int updateByPrimaryKey(VoteOption record);
    /**
     * 
    * @Title: listNewVote
    * @Description: TODO(获取最新投票列表)
    * @param @return    设定文件
    * @return List<Option>    返回类型
    * @throws
     */
	List<VoteTopic> listNewVote(int max);
	/**
	 * 
	* @Title: listHotVote
	* @Description: TODO(获取最热投票列表)
	* @param @return    设定文件
	* @return List<Option>    返回类型
	* @throws
	 */
	List<VoteHistoryDto> listHotVote(int max);
	
	List<Map<String, Object>> getVoteList(Map<String, Object> condition);

	Integer getVoteCount(Map<String, Object> condition);
	
	List<Map<String, Object>> getMyJoinList(Map<String, Object> condition);
	
	Integer getMyJoinCount(Map<String, Object> condition);
	
	
	Map<String, Object> getTopicById(String topicId);
	List<Map<String, Object>> getOptionList(Map<String, Object> condition);
	
	List<Map<String, Object>> getVoteResult(String topicId);
	
	Integer getMyCreateCount(Map<String, Object> condition);
	
	List<Map<String, Object>> getMyCreateList(Map<String, Object> condition);
	
	List<List<Object>> getVoteResultList(String topicId);
}
